#ifndef SNAKE_HH
#define SNAKE_HH
#include <vector>
#include <SDL2/SDL.h>
#include "sprites.hh"
enum Direction
{
	Left,
	Right,
	Up,
	Down
};
enum Type
{
	Head,
	Middle,
	Tail
};



class Snake
{
public:
	Snake();
	Snake(Snake* prevPart, int index);
	int getSpriteRectIndex();
	SDL_Rect* getPosition();
	SDL_Rect* getPrevPosition();
	void setDirection(const int direction);
	const int getDirection();
	const int getPrevDirection();
	void update();
	void draw(SDL_Renderer* renderer, SDL_Texture* texture, Sprites* sprites);
	void score(int index);
	int *permittedX;
	int *permittedY;

private:
	int index;
	int prevDirection;
	int direction;
	int type;
	SDL_Rect position;
	SDL_Rect prevPosition;
	Snake* nextPart;
	Snake* prevPart;
};

#endif
